package com.d3works.apps.message.module;

import com.d3works.app.D3worksModule;
import com.d3works.apps.message.db.repo.MessageManagementRepository;
import com.d3works.apps.message.db.repo.MessageRepository;
import com.d3works.apps.message.service.MailAccountService;
import com.d3works.apps.message.service.MailAccountServiceImpl;
import com.d3works.apps.message.service.MailMessageService;
import com.d3works.apps.message.service.MailMessageServiceImpl;
import com.d3works.apps.message.service.MailServiceMessageImpl;
import com.d3works.apps.message.service.MessageService;
import com.d3works.apps.message.service.MessageServiceImpl;
import com.d3works.apps.message.service.SendMailQueueService;
import com.d3works.apps.message.service.TemplateMessageService;
import com.d3works.apps.message.service.TemplateMessageServiceImpl;
import com.d3works.apps.message.service.TemplateService;
import com.d3works.mail.service.MailServiceImpl;

public class MessageModule extends D3worksModule {

  @Override
  protected void configure() {
    bind(TemplateMessageService.class).to(TemplateMessageServiceImpl.class);
    bind(MessageService.class).to(MessageServiceImpl.class);
    bind(MessageRepository.class).to(MessageManagementRepository.class);
    bind(MailAccountService.class).to(MailAccountServiceImpl.class);
    bind(MailServiceImpl.class).to(MailServiceMessageImpl.class);
    bind(MailMessageService.class).to(MailMessageServiceImpl.class);
    // needed to use event notification methods
    bind(SendMailQueueService.class);
    bind(TemplateService.class);
  }
}
